package 空对象模式.basic;

/**
 *
 */
public class ObjectFactory {
	public static AbstractObject creator(final String name) {
		AbstractObject result = null;
		switch (name) {
			case "Java":
				result = new EmptyObject("Java");
				break;
			case "SQL":
				result = new EmptyObject("SQL");
				break;
			default:
				result = new NullObject();
				break;
		}
		return result;
	}

}
